Benjamin Otte [Sun, 4 Jul 2021 00:43:49 +0000 (02:43 +0200)]
gdk: Allow GdkDrawContext with a %NULL surface
This is not used yet, but it allows surfaceless GL contexts.
For that purpose, we need to make the display a construct-only property,
so that it can be set when the surface isn't.
This adds a bunch of very picky checks in the constructor so nothing bad
can happen.
Benjamin Otte [Sat, 3 Jul 2021 23:43:16 +0000 (01:43 +0200)]
gdk: Add a private struct to GdkDisplay
... and move some members from the GdkDisplay struct.
We've always wanted to add one to isolate the display from the backends
a bit more, but so far it's never happened.
Now that I'm about to add more data to GdkDisplay, it's a good excuse to
start.
Benjamin Otte [Fri, 2 Jul 2021 01:37:32 +0000 (03:37 +0200)]
x11: Redo choice between EGL and GLX
We try EGL first, but are very picky about what we accept.
If that fails, we try to go with GLX instead.
And if that also fails, we try EGL again, but this time accept anything.
The idea here is that EGL is the preferred method going forward, but GLX is
the tried and tested method that we know works. So if we detect issues with
EGL, we want to avoid using it in favor of GLX.
Also add a GDK_DEBUG=gl-egl option to force EGL at all costs and not try
GLX.
Benjamin Otte [Fri, 2 Jul 2021 01:21:14 +0000 (03:21 +0200)]
x11: Properly record the error when initializing GL
That way, we can give a useful error message when things break down for
users.
These error messages could still be improved in places (like looking at
the actual EGL error codes), but that seemed overkill.
Benjamin Otte [Fri, 2 Jul 2021 00:33:18 +0000 (02:33 +0200)]
x11: Do not call glXQueryExtension()
epoxy does that already.
Benjamin Otte [Fri, 18 Jun 2021 12:46:24 +0000 (14:46 +0200)]
x11: Get Visual from EGL directly
Query the EGL_VISUAL_ID from the egl Config and select a config with the
matching Visual.
This is currently broken on Mesa because it does not expose any RGBA
X Visuals in any EGL config, so we always end up with opaque Windows.
https://gitlab.freedesktop.org/mesa/mesa/-/issues/149
Benjamin Otte [Tue, 29 Jun 2021 21:45:50 +0000 (23:45 +0200)]
x11: Store the GLX drawable in the surface
Also, stop using a dummy window for unattached GL contexts and instead
use the display's leader surface.
Again, this mirrors EGL.
Benjamin Otte [Tue, 29 Jun 2021 20:10:48 +0000 (22:10 +0200)]
x11: Use single GLX fbconfig and store it in the display
This mirrors the code for the EGL config.
Benjamin Otte [Tue, 29 Jun 2021 16:45:04 +0000 (18:45 +0200)]
x11: Remove glx version check
We only work with GLX >= 1.3 anyway, so don't explicitly check for it
and pretend to do something else that doesn't work otherwise.
Benjamin Otte [Tue, 29 Jun 2021 16:44:09 +0000 (18:44 +0200)]
x11: Remove unused struct member
We don't care if the GL context is direct at all.
Benjamin Otte [Tue, 15 Jun 2021 12:48:55 +0000 (14:48 +0200)]
Revert "x11: Always fall back to GLX on NVIDIA"
This reverts commit
c35a6725b99722d91b0ed6580546c27c8f0849ba.
This approach doesn't work because if NVIDIA doesn't work for EGL, the
EGL implementation won't be provided by NVIDIA, so checking the vendor
doesn't work.
Benjamin Otte [Sun, 13 Jun 2021 21:35:06 +0000 (23:35 +0200)]
x11: Remove the dummy surface
Instead, use the display's "leader surface" when no surface is required,
because we have it lying around.
Really, we want to use EGL_NO_SURFACE, but if that's not supported...
Benjamin Otte [Sun, 13 Jun 2021 15:43:15 +0000 (17:43 +0200)]
x11: Remove GdkVisual
It's not used anymore.
Benjamin Otte [Sun, 13 Jun 2021 15:34:55 +0000 (17:34 +0200)]
x11: Rework Visual selection
Instead of going via GdkVisual, doing a preselection and letting the GL
initialization improve it, let the GL initialization pick an X Visual
directly using X Visual code directly.
The code should select the same visuals as before as it tries to apply
the same logic, but it's a rewrite, so I expect I messed something up.
Benjamin Otte [Sat, 12 Jun 2021 09:13:22 +0000 (11:13 +0200)]
glx: Remove Visual cache
1. We're using EGL most of the time anyway, so if we wanted to cache
things, we'd need to port it there.
2. Our GL handling is massively configurable, so determining when to use
the cache and when not is a challenge.
3. It makes startup nondeterministic and depend on whether a GTK4 app
has previously been started on this display and nobody thinks about
that when debugging.
4. The only benefit of the caching is delaying GL initialization - which
made sense in GTK3 where almost no app used GL but doesn't make sense
in GTK4 where almost every app uses GL.
So unless I find a big benefit to reintroducing it, this cache will be
gone for good.
Benjamin Otte [Sat, 12 Jun 2021 09:07:24 +0000 (11:07 +0200)]
x11: Move GL init code into the GL context
No functional changes, just shuffling code.
Benjamin Otte [Thu, 10 Jun 2021 21:10:22 +0000 (23:10 +0200)]
x11: Store the EGL surface in the GdkSurfaceX11
Avoids having to use private data, though the benefit is somewhat
limited as we still have to put the destructor in the egl code and can't
just put it in gdk_surface_x11_finalize().
Benjamin Otte [Wed, 9 Jun 2021 11:42:19 +0000 (13:42 +0200)]
x11: Store the EGL config in the display
We only have one config, because we use the same Visual everywhere.
Store this config in the GdkDisplayX11 struct for easy access.
Also do this on initialize, because if creating the config fails, we
want to switch to GLX instead of failing to do GL at all.
This also simplifies a lot of code as we can share Visual, Colormap, etc
across surfaces.
Benjamin Otte [Mon, 7 Jun 2021 12:30:29 +0000 (14:30 +0200)]
x11: Move the EGL display into the private struct
There's no need to use g_object_set_data() for it.
We can also stop caching it elsewhere because we know the display has
it.
And finally, we can remove the display->have_egl boolean and use
display->egl_display != NULL instead. We initialize the display at
startup, so that variable is the perfect indicator.
Benjamin Otte [Sun, 6 Jun 2021 17:56:35 +0000 (19:56 +0200)]
x11: Pass the display, not the screen
Screens are on their way out.
Benjamin Otte [Sun, 6 Jun 2021 15:29:29 +0000 (17:29 +0200)]
x11: Simplify code
These variables were a lot more important in GTK3, but now we just want
to pass them through to X.
Benjamin Otte [Sun, 6 Jun 2021 15:18:16 +0000 (17:18 +0200)]
x11: Move function call
The GLX visual selection is GLX specific, so it can be handled by the GLX
code.
There should be no reordering here, the call was just moved.
Benjamin Otte [Sun, 6 Jun 2021 15:14:31 +0000 (17:14 +0200)]
glx: Don't initialize GLX multiple times.
Either it is initialized or it isn't.
Benjamin Otte [Sun, 6 Jun 2021 15:07:05 +0000 (17:07 +0200)]
x11: Initialize GL at startup
We need to initialize GL to select the Visual we are going to use for
all our Windows.
As the Visual needs to be known before we know if we are even gonna use
GL later, we can't avoid initializing it.
Note that this previously happened, too. It was just hidden behind the
GdkScreen initialization.
Benjamin Otte [Thu, 3 Jun 2021 17:20:51 +0000 (19:20 +0200)]
x11: Don't share cached GLX visuals with GTK3
We don't want to bind ourselves to GTK3 - both because we don't want to
accidentally cause bugs in a different codebase and because we want to
deviate from it.
While doing so, also store visuals as visuals and not as integers.
And only store one Visual because GTK4 only uses one visual.
And then remove the code that is leftover for dealing with the
compatibility Visual for GTK3.
PS: I'm kinda proud of my STRINGIFY_WITHOUT_BRACKETS hack.
Benjamin Otte [Thu, 3 Jun 2021 03:02:15 +0000 (05:02 +0200)]
x11: Reorder code
Initialize the GL visuals from gdkdisplay.c so the call into the GL
stack isn't hidden in gdkvisual.c
This is relevant for further commits.
Benjamin Otte [Thu, 3 Jun 2021 02:54:37 +0000 (04:54 +0200)]
x11: Stop reordering visuals
The old code was ordering visuals by depth, but considering that these
days we either use the default visual or a 32bit RGBA visual, that
reordering does not have an effect anymore.
In theory, the only effect is that the GLX Visual selection might select
a different replacement Visual when it checks for improved GL Visuals, but
even there I can't come up with a case where that matters, because
again, the visuals are only reordered by depth and we want to keep the
depth.
In any case, make this a separate commit so bisecting can find this
problem if it ever shows up.
Benjamin Otte [Thu, 3 Jun 2021 02:45:36 +0000 (04:45 +0200)]
x11: Remove unused function
Now that we can't create extra GdkX11Screens anymore, this also means
that there is exactly 1 GdkX11Screen per GdkX11Display.
Benjamin Otte [Thu, 3 Jun 2021 02:42:23 +0000 (04:42 +0200)]
x11: Move code where it belongs
Instead of the display telling the screen to tell the visuals to tell
the display to initialize itself, just init the display directly.
What a concept.
Benjamin Otte [Mon, 7 Jun 2021 12:56:25 +0000 (14:56 +0200)]
build: Build demos before tools
That's a sneaky trick so my edit/compile/test cycle goes faster:
I usually use demos for testing so the tools don't have to be linked for
me to start testing.
Matthias Clasen [Wed, 21 Jul 2021 21:33:53 +0000 (21:33 +0000)]
Merge branch 'destroy-pointer-gestures' into 'master'
gdk/wayland: Clean up gestures if pointer capability is withdrawn
See merge request GNOME/gtk!3697
Vlad Zahorodnii [Tue, 22 Jun 2021 06:23:42 +0000 (09:23 +0300)]
gdk/wayland: Clean up gestures if pointer capability is withdrawn
If the pointer capability is added, pointer swipe and pinch gestures
will be created. However, if the pointer capability is removed, the
gesture objects won't be destroyed.
If the pointer capability is removed and added several times in a row,
for example due to plugging and unplugging physical mouse, this can lead
to leaking the old gesture objects.
In order to prevent that, this change makes the seat destroy swipe and
pinch gestures when the pointer capability is withdrawn.
Matthias Clasen [Wed, 21 Jul 2021 17:49:15 +0000 (17:49 +0000)]
Merge branch 'sync-icons' into 'master'
Sync included icons from adwaita-icon-theme
See merge request GNOME/gtk!3773
Matthias Clasen [Tue, 20 Jul 2021 21:18:06 +0000 (17:18 -0400)]
Sync included icons from adwaita-icon-theme
Make sure we stay in sync with the Adwaita.
Matthias Clasen [Tue, 20 Jul 2021 18:25:59 +0000 (18:25 +0000)]
Merge branch 'wip/otte/build' into 'master'
Streamline build configuration
See merge request GNOME/gtk!3391
Benjamin Otte [Fri, 2 Apr 2021 01:05:40 +0000 (03:05 +0200)]
x11: Remove XComposite
It's only used during DND to allow use of the root window's cow window
as a DND target, because apparently gnome-shell used to think that was a
great idea to DND to the overview.
Somebody complain to gnome-shell devs about it not being a good idea if
they want it fixed.
Potentially using Wayland is a better idea though.
This reverts
85ae875dcbfcfa3fbdca857dc90467d39b9ff0c5
Related: https://bugzilla.gnome.org/show_bug.cgi?id=601731
Benjamin Otte [Fri, 2 Apr 2021 00:52:49 +0000 (02:52 +0200)]
x11: Remove unused headers
Benjamin Otte [Fri, 2 Apr 2021 00:13:49 +0000 (02:13 +0200)]
build: Make all X11 extensions mandatory
It's not 2011 anymore, and we shouldn't randomly build one of 10.000
different combinations of X11 backends (I counted the possibilities) but
exactly the one we expect people to use.
Benjamin Otte [Thu, 1 Apr 2021 19:29:41 +0000 (21:29 +0200)]
build: Remove sassc option
Instead, ensure that sassc is made madatory on git builds (because
it is, we don't ship CSS files anymore) and not even looked for in
release builds (because do ship CSS files there).
Benjamin Otte [Thu, 1 Apr 2021 16:08:19 +0000 (18:08 +0200)]
build: disable Vulkan by default
We don't want people to build Vulkan support when they just want to get
GTK built.
This is in particular true for GTK as a CI subproject or for people
using jhbuild.
Worse, just having Vulkan support compiled in tends to cause crashes
in the Inspector, even if you are not using it.
Benjamin Otte [Thu, 1 Apr 2021 15:59:18 +0000 (17:59 +0200)]
build: Set proper defaults for media backends
GTK supports webm playback, which means a backend should always be
compiled.
The ffmpeg backend however is incomplete (no audio) and as such, we
don't want people to end up with it accidentally.
Since we don't want to drag an entire gstreamer build into our ci
on MacOs or msvc, explicitly disable the gstreame media backend there.
Matthias Clasen [Tue, 20 Jul 2021 12:54:55 +0000 (12:54 +0000)]
Merge branch 'fix-dialog-docs' into 'master'
gtk/builder: Port example to GTK 4
See merge request GNOME/gtk!3772
Yuri Chornoivan [Tue, 20 Jul 2021 12:08:13 +0000 (12:08 +0000)]
Update Ukrainian translation
Maximiliano Sandoval R [Tue, 20 Jul 2021 11:15:57 +0000 (13:15 +0200)]
gtk/builder: Port example to GTK 4
Matthias Clasen [Tue, 20 Jul 2021 11:17:36 +0000 (11:17 +0000)]
Merge branch 'tooltip-hig' into 'master'
password_entry: Header Capitalization on tooltip
See merge request GNOME/gtk!3771
Maximiliano Sandoval R [Tue, 20 Jul 2021 11:00:05 +0000 (13:00 +0200)]
password_entry: Header Capitalization on tooltip
See https://teams.pages.gitlab.gnome.org/Design/hig-www/feedback/tooltips.html
Matthias Clasen [Tue, 20 Jul 2021 02:43:43 +0000 (02:43 +0000)]
Merge branch 'win32.hidpi.cleanup' into 'master'
GDK-Win32: Clean up HiDPI support and WGL slightly
Closes #3796
See merge request GNOME/gtk!3767
Matthias Clasen [Mon, 19 Jul 2021 18:36:11 +0000 (18:36 +0000)]
Merge branch 'ci-default-settings-4' into 'master'
reftests: Enforce default settings
See merge request GNOME/gtk!3769
Matthias Clasen [Mon, 19 Jul 2021 17:10:31 +0000 (13:10 -0400)]
reftests: Enforce default settings
Set all settings to their default values, so we
are less dependent on the environment to be set
up just right. In particular, this fixes animations
being disabled when we happen to run in a vm.
Chun-wei Fan [Mon, 19 Jul 2021 10:20:09 +0000 (18:20 +0800)]
GDK-Win32: Clean up HiDPI support and WGL a bit
Make _gdk_win32_display_get_monitor_scale_factor() less complex, by:
* Drop the preceding underscore.
* Dropping an unused parameter.
* Using a GdkSurface instead of a HWND, as the HWND that we pass into
this function might have been taken from a GdkSurface, which are now
always created with CS_OWNDC. This means if a GdkSurface was passed
in, we ensure that we only acquire the DC from the HWND once, and do
not attempt to call ReleaseDC() on it.
* Store the HDC that we acquire from the GdkSurface's HWND into the
surface, and use that as the HDC we need for our GdkGLContext.
* Drop the gl_hwnd from GdkWin32Display, as that is really should be
stored in the GdkSurface.
* For functions that were updated, name GdkWin32Display variables as
display_win32 and GdkSurface variables as surface, to unify things.
* Stop calling ReleaseDC() on the HDC that we use for OpenGL, since
they were acquired from HWND's created with CS_OWNDC.
Chun-wei Fan [Mon, 19 Jul 2021 02:44:48 +0000 (10:44 +0800)]
gdksurface-win32.c: Create all surfaces with CS_OWNDC
We want to ensure that we have things set up properly for drag surfaces
as well.
Matthias Clasen [Sat, 17 Jul 2021 13:05:42 +0000 (13:05 +0000)]
Merge branch 'pango-main' into 'master'
Use pango from the main branch
See merge request GNOME/gtk!3762
Yuri Chornoivan [Sat, 17 Jul 2021 05:34:21 +0000 (05:34 +0000)]
Update Ukrainian translation
Matthias Clasen [Fri, 16 Jul 2021 17:19:22 +0000 (13:19 -0400)]
Use pango from the main branch
Change the Pango subproject to use the main branch.
This depends on
https://gitlab.gnome.org/GNOME/pango/-/merge_requests/379
Benjamin Otte [Fri, 16 Jul 2021 16:26:23 +0000 (16:26 +0000)]
Merge branch 'wip/otte/for-master' into 'master'
cssimagecrossfade: Don't abort() when failing to parse image
Closes #4101
See merge request GNOME/gtk!3758
Benjamin Otte [Fri, 16 Jul 2021 15:48:25 +0000 (17:48 +0200)]
cssimagecrossfade: Don't abort() when failing to parse image
The code wasn't checking if parsing an image failed and just returning
success.
Testcase from bug is attached.
Fixes #4101
Matthias Clasen [Fri, 16 Jul 2021 11:59:47 +0000 (11:59 +0000)]
Merge branch 'fix-negative-scales' into 'master'
ngl: Handle negative scales
Closes #4096
See merge request GNOME/gtk!3755
Matthias Clasen [Fri, 16 Jul 2021 11:14:09 +0000 (11:14 +0000)]
Merge branch 'metainfo' into 'master'
metadata: Fix license identifiers and appdata
See merge request GNOME/gtk!3757
Matthias Clasen [Fri, 16 Jul 2021 11:11:20 +0000 (07:11 -0400)]
testsuite: Avoid negative scales with gl renderer
The fix in
1c90bb522e7e722b was only for the ngl renderer,
so don't use the test with the gl renderer, until it is
fixed as well.
Matthias Clasen [Fri, 16 Jul 2021 11:04:21 +0000 (11:04 +0000)]
Merge branch 'wip/chergert/fix-texthistory-insert' into 'master'
texthistory: fix calculation of n_chars
See merge request GNOME/gtk!3756
Maximiliano Sandoval R [Fri, 16 Jul 2021 08:46:53 +0000 (10:46 +0200)]
meson: Use a valid SPDX identifier
See https://mesonbuild.com/Reference-manual.html#license
Maximiliano Sandoval R [Fri, 16 Jul 2021 08:43:11 +0000 (10:43 +0200)]
appdata: Use launchable rather than id
<id> should be used for the component id and <launchable> for the
desktop file.
Maximiliano Sandoval R [Fri, 16 Jul 2021 08:41:40 +0000 (10:41 +0200)]
appdata: Add content_rating
https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-content_rating
Maximiliano Sandoval R [Fri, 16 Jul 2021 08:34:25 +0000 (10:34 +0200)]
appdata: Use correct SPDX license identifier
Following
https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-project_license,
for the complete list of identifiers see https://spdx.org/licenses/
Christian Hergert [Fri, 16 Jul 2021 02:19:57 +0000 (19:19 -0700)]
texthistory: fix calculation of n_chars
This should be the number of characters, not the end position. This fixes
an issue where we wouldn't coalesce insert actions together.
Benjamin Otte [Thu, 15 Jul 2021 21:33:54 +0000 (23:33 +0200)]
testsuite: Add test for crasher
Test for the crasher in !4096
Matthias Clasen [Thu, 15 Jul 2021 20:40:13 +0000 (16:40 -0400)]
ngl: Handle negative scales
Scale factors can be negative, but we were not
looking out for that, triggering an assertion when
trying to create a render target with negative
width of height. Avoid that.
Fixes: #4096
Matthias Clasen [Thu, 15 Jul 2021 18:39:48 +0000 (18:39 +0000)]
Merge branch 'transparent-optimizations' into 'master'
snapshot: Handle transparent opacity nodes correctly
See merge request GNOME/gtk!3754
Matthias Clasen [Thu, 15 Jul 2021 18:31:22 +0000 (18:31 +0000)]
Merge branch 'wip/baedert/for-master' into 'master'
snapshot: Replace trivial gradients with color nodes
See merge request GNOME/gtk!3753
Matthias Clasen [Thu, 15 Jul 2021 17:17:17 +0000 (13:17 -0400)]
ngl: Do nothing for transparent text nodes
Like the previous commit - a transparent text node
will not produce any visible pixels, so bail out early.
Matthias Clasen [Thu, 15 Jul 2021 17:16:37 +0000 (13:16 -0400)]
ngl: Do nothing for transparent color nodes
No need to send commands to the GPU to render transparency.
Matthias Clasen [Thu, 15 Jul 2021 17:14:13 +0000 (13:14 -0400)]
snapshot: Handle transparent opacity nodes correctly
Eliding totally transparent content from the node tree is
not 100% correct, since filters can make things visible, so
we need to at least preserve the bounds. We can do that by
creating a transparent color node.
Timm Bäder [Thu, 15 Jul 2021 14:52:38 +0000 (16:52 +0200)]
snapshot: Only compute start and end point if we have to
If the linear gradient results in a color node, we don't need the start
and end point. Only declare and compute it if we need to.
Timm Bäder [Thu, 15 Jul 2021 14:50:32 +0000 (16:50 +0200)]
snapshot: Replace trivial gradients with color nodes
Extend this to all existing gradient types
Benjamin Otte [Wed, 14 Jul 2021 18:46:36 +0000 (18:46 +0000)]
Merge branch 'wip/otte/for-master' into 'master'
rendernodeparser: Don't use %g when writing file
See merge request GNOME/gtk!3752
Benjamin Otte [Wed, 14 Jul 2021 18:19:40 +0000 (20:19 +0200)]
rendernodeparser: Remove leftover debug prints
Benjamin Otte [Wed, 14 Jul 2021 18:18:44 +0000 (20:18 +0200)]
rendernodeparser: Don't use %g when writing file
%g is locale dependent and can add "," where "." should be. Use
string_append_double() instead.
Emmanuele Bassi [Tue, 13 Jul 2021 23:43:06 +0000 (23:43 +0000)]
Merge branch 'doc-fixes' into 'master'
doc: Syntax fixes
See merge request GNOME/gtk!3751
Marco Melorio [Tue, 13 Jul 2021 22:53:19 +0000 (22:53 +0000)]
doc: Syntax fixes
Matthias Clasen [Tue, 13 Jul 2021 13:38:21 +0000 (13:38 +0000)]
Merge branch 'fp16-tests' into 'master'
ngl: Make the C half-float implementation accessible
See merge request GNOME/gtk!3748
Matthias Clasen [Tue, 13 Jul 2021 13:02:16 +0000 (09:02 -0400)]
tests: Add some fp16 tests
Matthias Clasen [Tue, 13 Jul 2021 13:02:35 +0000 (09:02 -0400)]
ngl: Make the C half-float implementation accessible
Make this accessible for tests.
Emmanuele Bassi [Tue, 13 Jul 2021 11:21:20 +0000 (11:21 +0000)]
Merge branch 'gi-fixes' into 'master'
Various introspection fixes
See merge request GNOME/gtk!3747
Marc-André Lureau [Tue, 13 Jul 2021 11:03:03 +0000 (15:03 +0400)]
gtk: fix GtkPasswordEntryBuffer introspection
Move the source file to public_sources list, and fix tag annotation.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Marc-André Lureau [Tue, 13 Jul 2021 07:31:00 +0000 (11:31 +0400)]
Add GtkMenuButton:primary Since: annotation
Property added in commit
a74420bc1a501f6ee951ed152e8f9a941b0c8438.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Marc-André Lureau [Tue, 13 Jul 2021 07:26:37 +0000 (11:26 +0400)]
Add GTK_DEBUG_ICONFALLBACK Since: 4.2 annotation
Introduced in commit
6f8240805617c2c772c4d298dc692ac831d22013.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Rafael Fontenelle [Sat, 10 Jul 2021 19:29:56 +0000 (19:29 +0000)]
Update Brazilian Portuguese translation
(cherry picked from commit
c7a7fc4de64e830bc5a67edad3fea10df67f668c)
Rafael Fontenelle [Sat, 10 Jul 2021 17:13:59 +0000 (17:13 +0000)]
Update Brazilian Portuguese translation
(cherry picked from commit
72c3026764fce622dcef4b51cee75eec44870a55)
Matthias Clasen [Sat, 10 Jul 2021 12:59:39 +0000 (12:59 +0000)]
Merge branch 'activatable-buttons' into 'master'
menubutton: Make menu buttons activatable again
Closes #4079
See merge request GNOME/gtk!3728
Matthias Clasen [Fri, 9 Jul 2021 19:29:41 +0000 (19:29 +0000)]
Merge branch 'wip/chergert/fix-4094' into 'master'
joinedmenu: add helper to join menus instead of nesting
Closes #4094
See merge request GNOME/gtk!3739
Matthias Clasen [Fri, 9 Jul 2021 10:58:23 +0000 (10:58 +0000)]
Merge branch 'gdkkeys-m' into 'master'
[master] gdkkeys-win32.c: fix initialisation of key_state in update_keymap
See merge request GNOME/gtk!3742
Matthias Clasen [Fri, 9 Jul 2021 10:57:37 +0000 (10:57 +0000)]
Merge branch 'dynamic-typelib-path' into 'master'
build: Get typelib dir dynamically using gobject-introspection dependency
See merge request GNOME/gtk!3737
Matthias Clasen [Fri, 9 Jul 2021 10:56:51 +0000 (10:56 +0000)]
Merge branch 'invisible-char-fix' into 'master'
textbtree: Initialize to zero the tags counting array
See merge request GNOME/gtk!3740
Jeremy Tan [Fri, 9 Jul 2021 04:35:44 +0000 (12:35 +0800)]
gdkkeys-win32.c: fix initialisation of key_state in update_keymap
It apparently worked by chance in the past, but now causes e.g.
alphanumeric characters to be interpreted as half-width katakana
when using the Japanese IME.
Marco Trevisan (Treviño) [Fri, 9 Jul 2021 01:34:40 +0000 (03:34 +0200)]
textbtree: Initialize to zero the tags counting array
We're using the tag contents array to count the number of invisible tags
set but we always increase it without being initialized.
This may lead to unexpected behavior when traversing them and it's
causing a reliable failure in the textiter tests under s390x.
So, memset that area content to 0 once allocated. It's not needed to do
the same for the tags themselves as we always assign them.
Conditional jump or move depends on uninitialised value(s)
at 0x4CFAA00: _gtk_text_btree_char_is_invisible (gtktextbtree.c:2569)
by 0x4B8A1BB: find_visible_by_log_attrs (gtktextiter.c:3244)
by 0x10E93D: check_backward_visible_word_start (textiter.c:484)
by 0x10E93D: test_visible_word_boundaries (textiter.c:523)
by 0x533288F: g_test_run_suite (in /usr/lib/s390x-linux-gnu/libglib-2.0.so.0)
by 0x53328E7: g_test_run (in /usr/lib/s390x-linux-gnu/libglib-2.0.so.0)
by 0x109CC1: main (textiter.c:807)
Christian Hergert [Thu, 8 Jul 2021 21:16:06 +0000 (14:16 -0700)]
joinedmenu: add helper to join menus instead of nesting
In many cases, we have an "extra-menu" property that is used to allow
applications to join menus into the native menu for the widget. Previously,
this was done by nesting that menu in a section.
Doing so increases the complexity of the rules for GtkMenuTracker as you
may want different handling from inside of the section vs toplevel
sections.
If instead we synthetically glue the menus together, we have a much more
natural joining of menus as the application developer would expect for
their menu.
This also ports GtkLabel, GtkText, GtkPasswordEntry, and GtkTextView to
use the joined menu helper.
The joined menu helper comes originally from GNOME Builder and has had
extensive use there.
Fixes #4094
Marco Trevisan (Treviño) [Thu, 8 Jul 2021 02:33:16 +0000 (04:33 +0200)]
build: Get typelib dir dynamically using gobject-introspection dependency
We hardcoded the typelib directory for only an arch (and a distro),
while we can just get it from gobject-introspection pkg config if tests
are enabled.
Matthias Clasen [Wed, 7 Jul 2021 21:37:58 +0000 (21:37 +0000)]
Merge branch 'wip/exalm/scroll-touch' into 'master'
scrolledwindow: Don't check drag threshold when already scrolling
See merge request GNOME/gtk!3735
Matthias Clasen [Wed, 7 Jul 2021 21:37:14 +0000 (21:37 +0000)]
Merge branch 'text-cursor-extents' into 'master'
text: Add API to compute cursor extents
See merge request GNOME/gtk!3734
Matthias Clasen [Wed, 7 Jul 2021 21:36:13 +0000 (21:36 +0000)]
Merge branch 'wl-since' into 'master'
Add missing "Since: 4.X" doc tags
See merge request GNOME/gtk!3736